package com.upcode.weighing.service.impl;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.upcode.weighing.common.Constants;
import com.upcode.weighing.domain.SysFile;
import com.upcode.weighing.mapper.SysFileMapper;
import com.upcode.weighing.service.SysFileService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 文件信息表 服务实现类
 * </p>
 *
 * @author ZYW
 * @since 2018-04-06
 */
@Service
public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFile> implements SysFileService {

    @Override
    public boolean save(SysFile sysFile) {
        sysFile.setId(IdWorker.getId());
        sysFile.setStatus(Constants.STATUS_NORMAL);
        return super.save(sysFile);
    }
}
